<template>
  <div class="notify">
     <!-- <mt-header fixed title="发布新闻通知"></mt-header>
      <mt-field label="用户名" placeholder="请输入用户名" v-model="username"></mt-field>-->
      <mt-header title="发布新">
        <router-link to="/MainContent" slot="left">
          <mt-button icon="back">返回</mt-button>
        </router-link>
        <mt-button icon="more" slot="right"></mt-button>
      </mt-header>
      <mt-field placeholder="公告内容" type="textarea" rows="10" v-model="introduction"></mt-field>
      <mt-button type="primary" size="large" style="width:99%;margin:0 auto" @click="show">发布</mt-button>

  </div>
</template>
<script>
  import { MessageBox } from 'mint-ui';
  export default{

      name:'notify',
      data(){
          return {
            introduction:''
          }
      },
      methods:{
          show:function(){
            /*this.openConfirm();*/
            this.openConfirm();

           /* this.$router.push({name: 'MainContent'});*/
          },
          openConfirm:function(){
            MessageBox.confirm('确定发布','').then(
              ()=>{
                this.$router.push({name: 'MainContent'});
              },
              ()=>{
                this.introduction = '';
              }
            );
          }
      }

  }
  //haha
</script>
<style>

</style>
